﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Huirui.Cavan.Domain.MainBoundedContext.ReportModule;
using Spring.Data.Generic;

namespace Huirui.Cavan.Infrastructure.Data.MainBoundedContext.PurchaseModule
{
    public class PurchaseReturnReportMapper : IRowMapper<PurchaseReturnReport>
    {
        #region IRowMapper<PurchaseReturnReport> 成员

        public PurchaseReturnReport MapRow(System.Data.IDataReader reader, int rowNum)
        {
            PurchaseReturnReport report = new PurchaseReturnReport();
            report.PurchaseReturnCode = reader.GetString(0);
            report.ReturnDate = reader.GetDateTime(1);
            report.SupplierCode = reader.GetString(2);
            report.SupplierName = reader.GetString(3);
            report.Currency = reader.GetString(4);
            report.CurrencyRate = reader.GetDecimal(5);
            report.Amount = reader.GetDecimal(6);
            report.CheckedStatus = reader.GetInt32(7);
            report.SupplierInvoiceNumber = reader.GetString(8);
            report.PurchaseEmployeeCode = reader.GetString(9);
            report.EmployeeCode = reader.GetString(10);
            report.Remark = reader.GetString(11);

            return report;
        }

        #endregion
    }
}
